﻿@{
    Layout = null;
}
<!DOCTYPE html>
@Html.Partial("LoadPanelPartial")
<html>
<head>
     @if (false)
     {
        <script src="../../../../Scripts/jquery-vsdoc.js" type="text/javascript"></script>
        <script src="../../../../Scripts/ASPxScriptIntelliSense.js" type="text/javascript"></script>
     }
    <link href="@Url.Content("~/Content/Site.css", true)" rel="stylesheet" type="text/css" />

    <script src="@Url.Content("~/Scripts/jquery.min.js", true)" type="text/javascript"></script>

    <script src="@Url.Content("~/Scripts/FloatDiv.js", true)" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/regex.js", true)" type="text/javascript"></script>
    <script src="@Url.Content("~/Common/GetRootPath.ashx", true)" type="text/javascript"></script>
    
    @Html.DevExpress().GetStyleSheets(
                new StyleSheet { ExtensionType = ExtensionType.GridView, Theme = DevExpressHelper.Theme }

    )
    @Html.DevExpress().GetScripts(
                    new Script { ExtensionType = ExtensionType.ListBox }
    )

    <script type="text/javascript">


        $(document).ready(function () {
            var hdjsAlert = $("#hidMessage").val();
            var hdjsAlert2 = $("#hidIsClose").val();
            if (hdjsAlert != "") {
                alert(hdjsAlert);
                window.location.href = rootPath + "/Admin/MonthPlanSummary/Upload";
                if (hdjsAlert2 == "Y") {
                    window.returnValue = 'SUCCESS';
                    window.close();
                }
            }
        });

        function ok() {
            form1.submit();
        }

        function cancel() {
            window.location.href = rootPath + "/Admin/MonthPlanSummary/MonthPlanSummaryList";

        }

    </script>

</head>
    @helper get(int i)
        {
        string[] deptName = ViewData["arrDeptName"] as string[];
        
        @:@deptName[i]
    }


    @helper getold(int i)
        {
        string[] oldF = ViewData["arrstrFile"] as string[];
        
        @:@oldF[i]
    }
<body>
@using (Html.BeginForm("SaveFile", "MonthPlanSummary", FormMethod.Post, new { id = "form1", @class = "tableForm" }))
{
    <table class="tableForm" align="center">
        <tr><td align="center"><h2>廉效风险信息档案库</h2></td></tr>
    </table>
      <table class="tableForm" align="center">
        <tr><td align="left" valign="middle" colspan="2" height="50"><h3>单位、内设机构廉效风险防控登记表管理</h3></td></tr>
        <tr><td width="30%" class="tdClass" align="right">单位廉效风险防控登记表:</td>
        <td class="tdClass" width="30%">
             @Html.DevExpress().UploadControl(
                    settings =>
                    {
                        settings.Name = "uploaddw";
                        settings.BrowseButton.Text = "浏览";
                        settings.Height = System.Web.UI.WebControls.Unit.Percentage(100);
                        settings.ClearFileSelectionImage.ToolTip = "清除选择";
                    }).GetHtml()</td>
                    <td class="tdClass" align="right" width="8%">
                        原文件:
                    </td>
                    <td class="tdClass" >
                         @Html.DevExpress().Label(settings =>
                    {
                        settings.Name = "dwFAttachDesc";
                        settings.Width = System.Web.UI.WebControls.Unit.Percentage(96);
                        settings.Text = ViewData["dw"].ToString() == "" ? "暂时没有文件上传" : ViewData["dw"].ToString();

                    }).GetHtml()
                    </td>
                    </tr>
        <tr><td class="tdClass" align="right">内设机构廉效风险防控登记表:</td>
        <td class="tdClass" width="30%"> @Html.DevExpress().UploadControl(
                    settings =>
                    {
                        settings.Name = "uploadnsjg";
                        settings.BrowseButton.Text = "浏览";
                        settings.Height = System.Web.UI.WebControls.Unit.Percentage(100);
                        settings.ClearFileSelectionImage.ToolTip = "清除选择";
                    }).GetHtml()</td>
                    
                     <td class="tdClass" align="right">
                        原文件:
                    </td>
                    <td class="tdClass">
                         @Html.DevExpress().Label(settings =>
                    {
                        settings.Name = "nsFAttachDesc";
                        settings.Width = System.Web.UI.WebControls.Unit.Percentage(96);
                        settings.Text = ViewData["ns"].ToString() == "" ? "暂时没有文件上传" : ViewData["ns"].ToString();

                    }).GetHtml()
                    </td>
                    </tr>    
        </table>
       @*循环*@
             <table class="tableForm" id="personForm"> 
             <tr><td align="left" valign="middle" colspan="2" height="50"><h3>个人廉效风险防控登记表管理</h3></td></tr>

             @for (int i = 0; i < (ViewData["arrDeptName"] as string[]).Length; i++)
             {
                 
           <tr>
            <td width="30%" class="tdClass" align="right">@get(i):</td>
            <td class="tdClass" width="30%"> 
            @Html.DevExpress().UploadControl(
                    settings =>
                    {
                        settings.Name = "upload" + i;
                        settings.BrowseButton.Text = "浏览";
                        settings.Height = System.Web.UI.WebControls.Unit.Percentage(100);
                        settings.ClearFileSelectionImage.ToolTip = "清除选择";

                    }).GetHtml()</td>
                    
                   <td class="tdClass" align="right" width="8%">
                        原文件:
                    </td>
                    <td class="tdClass">
                         @Html.DevExpress().Label(settings =>
                    {
                        settings.Name = "grFAttachDesc" + i;
                        settings.Width = System.Web.UI.WebControls.Unit.Percentage(96);
                        settings.Text = getold(i).ToString() == "暂时没有文件上传" ? "暂时没有文件上传" : getold(i).ToString();
                    }).GetHtml()
                    </td>                   
                     </tr>                  
             }
              </table>
     @*循环*@
    <table class="tableForm"> 
     <tr>
             <th width="30%"></th>                        
            <td>
                @Html.DevExpress().Button(settings =>
           {
               settings.Name = "btnOK";
               settings.Text = "确定";
               settings.ControlStyle.CssClass = "button";
               settings.Images.Image.Url = Url.Content("~/Content/ControlImages/ok.png");
               settings.ClientSideEvents.Click = "ok";
           }).GetHtml()
                @Html.DevExpress().Button(settings =>
           {
               settings.Name = "btnCancel";
               settings.Text = "取消";
               settings.ControlStyle.CssClass = "button";
               settings.Images.Image.Url = Url.Content("~/Content/ControlImages/no.png");
               settings.CausesValidation = false;
               settings.ClientSideEvents.Click = "cancel";

           }).GetHtml()
            </td>
        </tr>
    </table>
     @Html.Hidden("hidMessage", ViewData["message"])
     @Html.Hidden("hidIsClose", ViewData["IsClose"])
     @Html.Hidden("hidarr", ViewData["arr"])
     @Html.Hidden("hidtype", ViewData["type"])
     @Html.Hidden("hiddeptNo", ViewData["deptNo"])
     @Html.Hidden("hidarrold", ViewData["arrold"])
     @Html.Hidden("hiddwtitle", ViewData["dwtitle"])
     @Html.Hidden("hidnstitle", ViewData["nstitle"])
    
}
    </body>
</html>
